<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024/8/9
  Time: 10:57
  To change this template use File | Settings | File Templates.
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>电影信息列表</title>
  <script src="${pageContext.request.contextPath}/statics/jquery-1.8.3.min.js"></script>
  <style>
    a{
      text-decoration: none;
      color: black;
    }
    table,td,th{
      border: 1px solid black;
    }
    #one{
      width: 800px;
      height: 300px;
      margin: 0 auto;
    }
    .ctr{
      margin: 0 auto;
    }
    h1{
      width: 200px;
    }
    .ctr:last-child{
      width: 420px;
    }
    #btn{
      margin-left: 147px;
    }
  </style>
</head>
<body>
<div id="one">
  <h1 class="ctr">请假记录列表</h1>
  <table class="ctr">
    <spen id="btn"><a href="${pageContext.request.contextPath}/toAdd">添加请假记录</a></spen>
    <tr>
      <th>编号</th>
      <th>姓名</th>
      <th>请假时间</th>
      <th>请假原因</th>
      <th>操作</th>
    </tr>
    <c:forEach items="${page.data}" var="leave">
      <tr>
        <td>${leave.id}</td>
        <td>${leave.name}</td>
        <td>${leave.leaveTime}</td>
        <td>${leave.reason}</td>
        <td><a onclick="del(${leave.id})">删除</a></td>
      </tr>
    </c:forEach>
  </table>
  <div class="ctr">
    <a href="${pageContext.request.contextPath}/index?pageIndex=1">首页</a>&nbsp;
    <a href="${pageContext.request.contextPath}/index?pageIndex=${page.pageNo + 1}">下一页</a>&nbsp;
    <a href="${pageContext.request.contextPath}/index?pageIndex=${page.pageNo - 1}">上一页</a>&nbsp;
    <a href="${pageContext.request.contextPath}/index?pageIndex=${page.totalPage}">尾页</a>&nbsp;
    <span>第${page.pageNo}页，共${page.totalPage}页，总记录数${page.totalCount}条</span>
  </div>
</div>
<script>
  function del(id){

  }

  $(function (){
    $("tr:even").css("backgroundColor","gray");
    $("tr:odd").css("backgroundColor","white");
  })
</script>
</body>
</html>

